package pcjavanet.mobilesell.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class HistoryExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public HistoryExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andDbidIsNull() {
            addCriterion("dbid is null");
            return (Criteria) this;
        }

        public Criteria andDbidIsNotNull() {
            addCriterion("dbid is not null");
            return (Criteria) this;
        }

        public Criteria andDbidEqualTo(Integer value) {
            addCriterion("dbid =", value, "dbid");
            return (Criteria) this;
        }

        public Criteria andDbidNotEqualTo(Integer value) {
            addCriterion("dbid <>", value, "dbid");
            return (Criteria) this;
        }

        public Criteria andDbidGreaterThan(Integer value) {
            addCriterion("dbid >", value, "dbid");
            return (Criteria) this;
        }

        public Criteria andDbidGreaterThanOrEqualTo(Integer value) {
            addCriterion("dbid >=", value, "dbid");
            return (Criteria) this;
        }

        public Criteria andDbidLessThan(Integer value) {
            addCriterion("dbid <", value, "dbid");
            return (Criteria) this;
        }

        public Criteria andDbidLessThanOrEqualTo(Integer value) {
            addCriterion("dbid <=", value, "dbid");
            return (Criteria) this;
        }

        public Criteria andDbidIn(List<Integer> values) {
            addCriterion("dbid in", values, "dbid");
            return (Criteria) this;
        }

        public Criteria andDbidNotIn(List<Integer> values) {
            addCriterion("dbid not in", values, "dbid");
            return (Criteria) this;
        }

        public Criteria andDbidBetween(Integer value1, Integer value2) {
            addCriterion("dbid between", value1, value2, "dbid");
            return (Criteria) this;
        }

        public Criteria andDbidNotBetween(Integer value1, Integer value2) {
            addCriterion("dbid not between", value1, value2, "dbid");
            return (Criteria) this;
        }

        public Criteria andDatestrIsNull() {
            addCriterion("datestr is null");
            return (Criteria) this;
        }

        public Criteria andDatestrIsNotNull() {
            addCriterion("datestr is not null");
            return (Criteria) this;
        }

        public Criteria andDatestrEqualTo(String value) {
            addCriterion("datestr =", value, "datestr");
            return (Criteria) this;
        }

        public Criteria andDatestrNotEqualTo(String value) {
            addCriterion("datestr <>", value, "datestr");
            return (Criteria) this;
        }

        public Criteria andDatestrGreaterThan(String value) {
            addCriterion("datestr >", value, "datestr");
            return (Criteria) this;
        }

        public Criteria andDatestrGreaterThanOrEqualTo(String value) {
            addCriterion("datestr >=", value, "datestr");
            return (Criteria) this;
        }

        public Criteria andDatestrLessThan(String value) {
            addCriterion("datestr <", value, "datestr");
            return (Criteria) this;
        }

        public Criteria andDatestrLessThanOrEqualTo(String value) {
            addCriterion("datestr <=", value, "datestr");
            return (Criteria) this;
        }

        public Criteria andDatestrLike(String value) {
            addCriterion("datestr like", value, "datestr");
            return (Criteria) this;
        }

        public Criteria andDatestrNotLike(String value) {
            addCriterion("datestr not like", value, "datestr");
            return (Criteria) this;
        }

        public Criteria andDatestrIn(List<String> values) {
            addCriterion("datestr in", values, "datestr");
            return (Criteria) this;
        }

        public Criteria andDatestrNotIn(List<String> values) {
            addCriterion("datestr not in", values, "datestr");
            return (Criteria) this;
        }

        public Criteria andDatestrBetween(String value1, String value2) {
            addCriterion("datestr between", value1, value2, "datestr");
            return (Criteria) this;
        }

        public Criteria andDatestrNotBetween(String value1, String value2) {
            addCriterion("datestr not between", value1, value2, "datestr");
            return (Criteria) this;
        }

        public Criteria andTypestringIsNull() {
            addCriterion("typestring is null");
            return (Criteria) this;
        }

        public Criteria andTypestringIsNotNull() {
            addCriterion("typestring is not null");
            return (Criteria) this;
        }

        public Criteria andTypestringEqualTo(String value) {
            addCriterion("typestring =", value, "typestring");
            return (Criteria) this;
        }

        public Criteria andTypestringNotEqualTo(String value) {
            addCriterion("typestring <>", value, "typestring");
            return (Criteria) this;
        }

        public Criteria andTypestringGreaterThan(String value) {
            addCriterion("typestring >", value, "typestring");
            return (Criteria) this;
        }

        public Criteria andTypestringGreaterThanOrEqualTo(String value) {
            addCriterion("typestring >=", value, "typestring");
            return (Criteria) this;
        }

        public Criteria andTypestringLessThan(String value) {
            addCriterion("typestring <", value, "typestring");
            return (Criteria) this;
        }

        public Criteria andTypestringLessThanOrEqualTo(String value) {
            addCriterion("typestring <=", value, "typestring");
            return (Criteria) this;
        }

        public Criteria andTypestringLike(String value) {
            addCriterion("typestring like", value, "typestring");
            return (Criteria) this;
        }

        public Criteria andTypestringNotLike(String value) {
            addCriterion("typestring not like", value, "typestring");
            return (Criteria) this;
        }

        public Criteria andTypestringIn(List<String> values) {
            addCriterion("typestring in", values, "typestring");
            return (Criteria) this;
        }

        public Criteria andTypestringNotIn(List<String> values) {
            addCriterion("typestring not in", values, "typestring");
            return (Criteria) this;
        }

        public Criteria andTypestringBetween(String value1, String value2) {
            addCriterion("typestring between", value1, value2, "typestring");
            return (Criteria) this;
        }

        public Criteria andTypestringNotBetween(String value1, String value2) {
            addCriterion("typestring not between", value1, value2, "typestring");
            return (Criteria) this;
        }

        public Criteria andSerialnumberIsNull() {
            addCriterion("serialnumber is null");
            return (Criteria) this;
        }

        public Criteria andSerialnumberIsNotNull() {
            addCriterion("serialnumber is not null");
            return (Criteria) this;
        }

        public Criteria andSerialnumberEqualTo(String value) {
            addCriterion("serialnumber =", value, "serialnumber");
            return (Criteria) this;
        }

        public Criteria andSerialnumberNotEqualTo(String value) {
            addCriterion("serialnumber <>", value, "serialnumber");
            return (Criteria) this;
        }

        public Criteria andSerialnumberGreaterThan(String value) {
            addCriterion("serialnumber >", value, "serialnumber");
            return (Criteria) this;
        }

        public Criteria andSerialnumberGreaterThanOrEqualTo(String value) {
            addCriterion("serialnumber >=", value, "serialnumber");
            return (Criteria) this;
        }

        public Criteria andSerialnumberLessThan(String value) {
            addCriterion("serialnumber <", value, "serialnumber");
            return (Criteria) this;
        }

        public Criteria andSerialnumberLessThanOrEqualTo(String value) {
            addCriterion("serialnumber <=", value, "serialnumber");
            return (Criteria) this;
        }

        public Criteria andSerialnumberLike(String value) {
            addCriterion("serialnumber like", value, "serialnumber");
            return (Criteria) this;
        }

        public Criteria andSerialnumberNotLike(String value) {
            addCriterion("serialnumber not like", value, "serialnumber");
            return (Criteria) this;
        }

        public Criteria andSerialnumberIn(List<String> values) {
            addCriterion("serialnumber in", values, "serialnumber");
            return (Criteria) this;
        }

        public Criteria andSerialnumberNotIn(List<String> values) {
            addCriterion("serialnumber not in", values, "serialnumber");
            return (Criteria) this;
        }

        public Criteria andSerialnumberBetween(String value1, String value2) {
            addCriterion("serialnumber between", value1, value2, "serialnumber");
            return (Criteria) this;
        }

        public Criteria andSerialnumberNotBetween(String value1, String value2) {
            addCriterion("serialnumber not between", value1, value2, "serialnumber");
            return (Criteria) this;
        }

        public Criteria andPriceIsNull() {
            addCriterion("price is null");
            return (Criteria) this;
        }

        public Criteria andPriceIsNotNull() {
            addCriterion("price is not null");
            return (Criteria) this;
        }

        public Criteria andPriceEqualTo(Double value) {
            addCriterion("price =", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceNotEqualTo(Double value) {
            addCriterion("price <>", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceGreaterThan(Double value) {
            addCriterion("price >", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceGreaterThanOrEqualTo(Double value) {
            addCriterion("price >=", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceLessThan(Double value) {
            addCriterion("price <", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceLessThanOrEqualTo(Double value) {
            addCriterion("price <=", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceIn(List<Double> values) {
            addCriterion("price in", values, "price");
            return (Criteria) this;
        }

        public Criteria andPriceNotIn(List<Double> values) {
            addCriterion("price not in", values, "price");
            return (Criteria) this;
        }

        public Criteria andPriceBetween(Double value1, Double value2) {
            addCriterion("price between", value1, value2, "price");
            return (Criteria) this;
        }

        public Criteria andPriceNotBetween(Double value1, Double value2) {
            addCriterion("price not between", value1, value2, "price");
            return (Criteria) this;
        }

        public Criteria andPeijianIsNull() {
            addCriterion("peijian is null");
            return (Criteria) this;
        }

        public Criteria andPeijianIsNotNull() {
            addCriterion("peijian is not null");
            return (Criteria) this;
        }

        public Criteria andPeijianEqualTo(String value) {
            addCriterion("peijian =", value, "peijian");
            return (Criteria) this;
        }

        public Criteria andPeijianNotEqualTo(String value) {
            addCriterion("peijian <>", value, "peijian");
            return (Criteria) this;
        }

        public Criteria andPeijianGreaterThan(String value) {
            addCriterion("peijian >", value, "peijian");
            return (Criteria) this;
        }

        public Criteria andPeijianGreaterThanOrEqualTo(String value) {
            addCriterion("peijian >=", value, "peijian");
            return (Criteria) this;
        }

        public Criteria andPeijianLessThan(String value) {
            addCriterion("peijian <", value, "peijian");
            return (Criteria) this;
        }

        public Criteria andPeijianLessThanOrEqualTo(String value) {
            addCriterion("peijian <=", value, "peijian");
            return (Criteria) this;
        }

        public Criteria andPeijianLike(String value) {
            addCriterion("peijian like", value, "peijian");
            return (Criteria) this;
        }

        public Criteria andPeijianNotLike(String value) {
            addCriterion("peijian not like", value, "peijian");
            return (Criteria) this;
        }

        public Criteria andPeijianIn(List<String> values) {
            addCriterion("peijian in", values, "peijian");
            return (Criteria) this;
        }

        public Criteria andPeijianNotIn(List<String> values) {
            addCriterion("peijian not in", values, "peijian");
            return (Criteria) this;
        }

        public Criteria andPeijianBetween(String value1, String value2) {
            addCriterion("peijian between", value1, value2, "peijian");
            return (Criteria) this;
        }

        public Criteria andPeijianNotBetween(String value1, String value2) {
            addCriterion("peijian not between", value1, value2, "peijian");
            return (Criteria) this;
        }

        public Criteria andRefStorehouseDbidIsNull() {
            addCriterion("ref_storehouse_dbid is null");
            return (Criteria) this;
        }

        public Criteria andRefStorehouseDbidIsNotNull() {
            addCriterion("ref_storehouse_dbid is not null");
            return (Criteria) this;
        }

        public Criteria andRefStorehouseDbidEqualTo(Integer value) {
            addCriterion("ref_storehouse_dbid =", value, "refStorehouseDbid");
            return (Criteria) this;
        }

        public Criteria andRefStorehouseDbidNotEqualTo(Integer value) {
            addCriterion("ref_storehouse_dbid <>", value, "refStorehouseDbid");
            return (Criteria) this;
        }

        public Criteria andRefStorehouseDbidGreaterThan(Integer value) {
            addCriterion("ref_storehouse_dbid >", value, "refStorehouseDbid");
            return (Criteria) this;
        }

        public Criteria andRefStorehouseDbidGreaterThanOrEqualTo(Integer value) {
            addCriterion("ref_storehouse_dbid >=", value, "refStorehouseDbid");
            return (Criteria) this;
        }

        public Criteria andRefStorehouseDbidLessThan(Integer value) {
            addCriterion("ref_storehouse_dbid <", value, "refStorehouseDbid");
            return (Criteria) this;
        }

        public Criteria andRefStorehouseDbidLessThanOrEqualTo(Integer value) {
            addCriterion("ref_storehouse_dbid <=", value, "refStorehouseDbid");
            return (Criteria) this;
        }

        public Criteria andRefStorehouseDbidIn(List<Integer> values) {
            addCriterion("ref_storehouse_dbid in", values, "refStorehouseDbid");
            return (Criteria) this;
        }

        public Criteria andRefStorehouseDbidNotIn(List<Integer> values) {
            addCriterion("ref_storehouse_dbid not in", values, "refStorehouseDbid");
            return (Criteria) this;
        }

        public Criteria andRefStorehouseDbidBetween(Integer value1, Integer value2) {
            addCriterion("ref_storehouse_dbid between", value1, value2, "refStorehouseDbid");
            return (Criteria) this;
        }

        public Criteria andRefStorehouseDbidNotBetween(Integer value1, Integer value2) {
            addCriterion("ref_storehouse_dbid not between", value1, value2, "refStorehouseDbid");
            return (Criteria) this;
        }

        public Criteria andCreateDateIsNull() {
            addCriterion("create_date is null");
            return (Criteria) this;
        }

        public Criteria andCreateDateIsNotNull() {
            addCriterion("create_date is not null");
            return (Criteria) this;
        }

        public Criteria andCreateDateEqualTo(Date value) {
            addCriterion("create_date =", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateNotEqualTo(Date value) {
            addCriterion("create_date <>", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateGreaterThan(Date value) {
            addCriterion("create_date >", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateGreaterThanOrEqualTo(Date value) {
            addCriterion("create_date >=", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateLessThan(Date value) {
            addCriterion("create_date <", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateLessThanOrEqualTo(Date value) {
            addCriterion("create_date <=", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateIn(List<Date> values) {
            addCriterion("create_date in", values, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateNotIn(List<Date> values) {
            addCriterion("create_date not in", values, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateBetween(Date value1, Date value2) {
            addCriterion("create_date between", value1, value2, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateNotBetween(Date value1, Date value2) {
            addCriterion("create_date not between", value1, value2, "createDate");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }

        public Criteria andDatestrLikeInsensitive(String value) {
            addCriterion("upper(datestr) like", value.toUpperCase(), "datestr");
            return this;
        }

        public Criteria andTypestringLikeInsensitive(String value) {
            addCriterion("upper(typestring) like", value.toUpperCase(), "typestring");
            return this;
        }

        public Criteria andSerialnumberLikeInsensitive(String value) {
            addCriterion("upper(serialnumber) like", value.toUpperCase(), "serialnumber");
            return this;
        }

        public Criteria andPeijianLikeInsensitive(String value) {
            addCriterion("upper(peijian) like", value.toUpperCase(), "peijian");
            return this;
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}